<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex complaintDetaiuls_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between complaintDetaiuls_fd0_0'      >
            <view   class='flex flex-wrap align-center complaintDetaiuls_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  complaintDetaiuls_fd0_0_c0_c0'  >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='complaintDetaiuls_fd0_0_c1_c0'  >投诉详情</text>
</view>
    <view   class='flex align-center justify-end complaintDetaiuls_fd0_0_c0'      >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center complaintDetaiuls_flex_1"    >
        <text class='complaintDetaiuls_fd1_0'      >{{detailsData.status_name}}</text>
</view>
        
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout complaintDetaiuls_flex_2"    >
            <view   class='flex flex-direction flex-wrap align-stretch complaintDetaiuls_fd2_0'      >
        <text class='complaintDetaiuls_fd2_0_c0'  >{{detailsData.title}}</text>
<text class='complaintDetaiuls_fd2_0_c1'  >{{detailsData.create_time}}</text>
<text class='complaintDetaiuls_fd2_0_c2'  >{{detailsData.content}}</text>
    <view   class='flex flex-wrap align-center complaintDetaiuls_fd2_0_c3'      >
            <template v-for = '(item,key0) in detailsData.picture'>
    <view   class='flex flex-wrap align-center complaintDetaiuls_fd2_0_c3_c0'       :key='key0'>
        <image class='complaintDetaiuls_fd2_0_c3_c0_c0'  mode="scaleToFill"  :src='item' @tap.stop="multiImagePreview(item,detailsData.picture,'')" ></image>
</view>
    </template>
    
</view>
    <view   class='flex flex-wrap align-center justify-between complaintDetaiuls_fd2_0_c4'      >
        <text class='complaintDetaiuls_fd2_0_c4_c0'  >联系人</text>
<text class='complaintDetaiuls_fd2_0_c4_c1'  >{{detailsData.contacts}}</text>
</view>
    <view   class='flex flex-wrap align-center justify-between complaintDetaiuls_fd2_0_c5'      >
        <text class='complaintDetaiuls_fd2_0_c4_c0'  >联系方式</text>
<text class='complaintDetaiuls_fd2_0_c4_c1'  >{{detailsData.contacts_phone}}</text>
</view>
    <view   class='flex flex-wrap align-center complaintDetaiuls_fd2_0_c6'    v-if= " detailsData.processing_results!=''"  >
            <view   class='flex-sub'      >
        <text class='complaintDetaiuls_fd2_0_c6_c0_c0'  >处理结果：</text>
<text class='complaintDetaiuls_fd2_0_c6_c0_c0'  >{{detailsData.processing_results}}</text>
</view>
</view>
</view>
</view>
        
<!---flex布局flex布局结束-->
    <view class="flex flex-wrap align-center justify-end benben-position-layout flex complaintDetaiuls_flex_3"    >
        <button class='complaintDetaiuls_fd3_0'  @tap="revokeComplaintFunc(2)" v-if= " detailsData.status!=1" >删除投诉</button><button class='complaintDetaiuls_fd3_0'  @tap="revokeComplaintFunc(1)" v-if= " detailsData.status=='1'" >撤销投诉</button>

        </view>
<view :style="{height: '100rpx'}"  ></view>
    
    
        </view>
    </view>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        
        
        data(){
			return {"detailsData":{"aid":"","title":"","content":"","picture":[],"contacts":"","sex":"","contacts_phone":"","status":"","create_time":"","processing_results":""},"id":""};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            let {id}=options
if (id !== undefined) this.id = id
this.getDetailsFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取投诉详情信息
                async getDetailsFunc(){
                        //请求方法
    //数据验证
    
  let datadetailsData = await this.$api.get(global.apiUrls.post64df4c10c0643, {
    aid:this.id
  });
  
  if (datadetailsData.data.code != 1) {
    this.$message.info(datadetailsData.data.msg);
    return
  } 
  let infodetailsData = datadetailsData.data;
  this.detailsData = infodetailsData.data
  
                },
                //提交撤销&删除投诉
                async revokeComplaintFunc(type){
                        let data64df50f8844f7 = await this.$api.dbPost(global.apiUrls.post64df50f8844f7, {
    aid: this.id,
    type,
});
if (!data64df50f8844f7) return
if (data64df50f8844f7.data.code != 1) {
    this.$message.info(data64df50f8844f7.data.msg);
    return
}

if (type == 1) {
    this.$message.info('撤销成功');
} else {
    this.$message.info('删除成功');
}
                setTimeout(()=>{
                    this.$urouter.navigateBack(1);
      },500)
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:rgba(246, 247, 249, 1);background-size: 100% auto;
        }
    .complaintDetaiuls_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .complaintDetaiuls_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#333333;
    }
    .complaintDetaiuls_fd0_0_c0_c0{
        font-size:36rpx;color:#333;font-weight:500;
    }
    .complaintDetaiuls_fd0_0_c0{
        width:100rpx;
    }
    .complaintDetaiuls_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .complaintDetaiuls_flex_1{
        background:var(--benbenbgColor2);height:72rpx;background-size:100% auto;padding:0rpx 32rpx 0rpx 32rpx;
    }
    .complaintDetaiuls_fd1_0{
        color:#FFFFFF;font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .complaintDetaiuls_flex_2{
        padding:24rpx 24rpx 0rpx 24rpx;
    }
    .complaintDetaiuls_fd2_0_c6_c0_c0{
        color:#333333;font-size:24rpx;font-weight:400;line-height:35rpx;
    }
    .complaintDetaiuls_fd2_0_c6{
        background:rgba(248, 248, 248, 1);margin:0rpx 24rpx 32rpx 24rpx;background-size:100% auto;border-radius:16rpx;padding:24rpx 24rpx 24rpx 24rpx;
    }
    .complaintDetaiuls_fd2_0_c5{
        margin:0rpx 24rpx 32rpx 24rpx;
    }
    .complaintDetaiuls_fd2_0_c4_c1{
        color:#333333;font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .complaintDetaiuls_fd2_0_c4_c0{
        color:#999999;font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .complaintDetaiuls_fd2_0_c4{
        border-top:1px solid #eee;margin:0rpx 24rpx 32rpx 24rpx;padding:32rpx 0rpx 0rpx 0rpx;
    }
    .complaintDetaiuls_fd2_0_c3_c0_c0{
        width:160rpx;height:160rpx;border-radius:16rpx;
    }
    .complaintDetaiuls_fd2_0_c3_c0{
        margin:0rpx 8rpx 24rpx 8rpx;
    }
    .complaintDetaiuls_fd2_0_c3{
        padding:0rpx 16rpx 0rpx 16rpx;
    }
    .complaintDetaiuls_fd2_0_c2{
        margin:0rpx 24rpx 20rpx 24rpx;color:#999999;font-size:28rpx;font-weight:400;line-height:39rpx;
    }
    .complaintDetaiuls_fd2_0_c1{
        color:#999999;font-size:28rpx;font-weight:400;line-height:40rpx;margin:16rpx 24rpx 20rpx 24rpx;
    }
    .complaintDetaiuls_fd2_0_c0{
        margin:27rpx 24rpx 12rpx 24rpx;color:#333333;font-size:32rpx;font-weight:400;line-height:45rpx;
    }
    .complaintDetaiuls_fd2_0{
        background:rgba(255, 255, 255, 1);background-size:100% auto;border-radius:16rpx;
    }
    .complaintDetaiuls_flex_3{
        background:rgba(255, 255, 255, 1);width:750rpx;height:100rpx;overflow:hidden;z-index:10;bottom:calc(0rpx + var(--window-bottom));background-size:100% auto;
    }
    .complaintDetaiuls_fd3_0{
        border:1px solid #BFBFBF;background:#FFFFFF;border-radius:28rpx 28rpx 28rpx 28rpx;width:150rpx;line-height:56rpx;font-size:24rpx;color:rgba(51, 51, 51, 1);height:56rpx;margin:0rpx 32rpx 0rpx 0rpx;
    }
</style>